home *** CD-ROM | disk | FTP | other *** search
/ Champak 130 / Vol 130.iso / games / target_s.swf / scripts / assets / objects / TargetLogo.as < prev    next >
Encoding:
Text File  |  2008-11-13  |  1.2 KB  |  41 lines

  1. package assets.objects
  2. {
  3.    import flash.display.MovieClip;
  4.    import flash.display.SimpleButton;
  5.    import flash.events.Event;
  6.    import flash.events.MouseEvent;
  7.    import flash.net.URLRequest;
  8.    import flash.net.navigateToURL;
  9.    
  10.    [Embed(source="/_assets/assets.swf", symbol="assets.objects.TargetLogo")]
  11.    public class TargetLogo extends MovieClip
  12.    {
  13.        
  14.       
  15.       private var url:String = "http://ad.doubleclick.net/clk;205717430;15177704;a?http://www.target.com/b?node=682514011";
  16.       
  17.       public var hitBtn:SimpleButton;
  18.       
  19.       public function TargetLogo()
  20.       {
  21.          url = "http://ad.doubleclick.net/clk;205717430;15177704;a?http://www.target.com/b?node=682514011";
  22.          super();
  23.          hitBtn.addEventListener(MouseEvent.CLICK,link);
  24.          addEventListener(Event.REMOVED_FROM_STAGE,removed);
  25.       }
  26.       
  27.       private function link(param1:Event) : *
  28.       {
  29.          var _loc2_:* = undefined;
  30.          _loc2_ = new URLRequest(url);
  31.          navigateToURL(_loc2_);
  32.       }
  33.       
  34.       private function removed(param1:Event) : *
  35.       {
  36.          hitBtn.removeEventListener(MouseEvent.CLICK,link);
  37.          removeEventListener(Event.REMOVED_FROM_STAGE,removed);
  38.       }
  39.    }
  40. }
  41.